<div class="layui-row" list_url="<{:url('goods/glists')}>">
    <span class="fr">
		日期范围：
        <div class="layui-input-inline">
		<input type="text" id="min_time" name="min_time" placeholder="最小时间" class="layui-input">
        </div>
		-
        <div class="layui-input-inline">
		<input type="text" id="max_time" name="max_time" placeholder="最大时间" class="layui-input">
        </div>
        <div class="layui-input-inline">
		<select onchange="com_quicktime(this)" style="width:90px">
			<option value="0">快捷时间</option>
			<option value="1">最近1天</option>
			<option value="2">最近2天</option>
			<option value="3">最近3天</option>
			<option value="4">最近4天</option>
			<option value="5">最近5天</option>
			<option value="6">最近6天</option>
			<option value="7">最近7天</option>
			<option value="8">最近8天</option>
			<option value="9">最近9天</option>
			<option value="10">最近10天</option>
			<option value="20">最近20天</option>
			<option value="30">最近30天</option>
			<option value="60">最近60天</option>
			<option value="90">最近90天</option>
			<option value="365">最近365天</option>
		</select>
        </div>
        <div class="layui-input-inline">
            <input type="text" name="keyword" autocomplete="off" placeholder="请输入搜索条件" class="layui-input">
        </div>
        <div class="layui-input-inline">
        <select name="cat_id">
            <{volist name='catlist' id='v'}>
          <option value="<{$v['id']}>">
            <{for start="0" end="$v.depath"}>
            &nbsp;
            <{/for}>--|<{$v['cat_title']}></option>
            <{/volist}>
        </select>
        </div>
        <div class="layui-input-inline">
        <select name="status">
          <option value="100all">全部状态</option>
            <{volist name='status' id='v'}>
          <option value="<{$key}>"><{$v}></option>
            <{/volist}>
        </select>
        </div>
        <div class="layui-input-inline">
        <select name="rec_id">
            <{volist name='rec' id='v'}>
          <option value="<{$key}>"><{$v}></option>
            <{/volist}>
        </select>
        </div>
        <button class="layui-btn mgl-20" search_id="list">查询</button>
    </span>
</div>
<div>
  <table class="layui-table">
    <thead>
      <tr>
        <th>图片</th>
        <th>标题</th>
        <th>分类</th>
        <th>状态</th>
        <th>时间</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody list_body>
    </tbody>
  </table>
  <div list_page>
  </div>
</div>
<script>
$().ready(function(){
  layui.form.render('select');
  $("[search_id='list']").click();
});
//添加到套餐
function addgoods(id,title){
  if($("#div_"+id).length>0){
    layui.layer.msg(title+'已添加');
  }else{
    var html = '<div id="div_'+id+'" class="layui-row">'+
      '<div class="layui-col-xs6" style="text-align:right;padding:10px;">'+title+'</div>'+
      '<input type="text" class="layui-input" style="display:inline;width:100px;" name="goods_ids['+id+']" value="1" />'+
      '<button class="layui-btn layui-btn-danger" onclick="del(this)">删除</button>'+
    '</div>';
    $("#goods").append(html);
  }
}
//删除
function del(e){
  $(e).parent("div").remove();
}
</script>
